using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region OperationLog

	/// <summary>
	/// OperationLog object for NHibernate mapped table 'OperationLog'.
	/// </summary>
	public class OperationLog
	{
		#region Member Variables
		
		protected int _id;
		protected string _userName;
		protected DateTime _addDate;
		protected string _moduleName;
		protected string _contents;
		protected string _ip;

		#endregion

		#region Constructors

		public OperationLog() { }

		public OperationLog( string userName, DateTime addDate, string moduleName, string contents, string ip )
		{
			this._userName = userName;
			this._addDate = addDate;
			this._moduleName = moduleName;
			this._contents = contents;
			this._ip = ip;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual string ModuleName
		{
			get { return _moduleName; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for ModuleName", value, value.ToString());
				_moduleName = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual string Ip
		{
			get { return _ip; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Ip", value, value.ToString());
				_ip = value;
			}
		}

		

		#endregion
	}
	#endregion
}